<!--
 * @description: 确认弹窗
 * @fileName: index
 * @author: 17076
 * @date: 2025/4/25-上午11:26
 * @version: V1.0.0
-->

<template>
  <div class="confirm-popover">
    <div>{{ title }}</div>
    <div class="flex-row bottom-button">
      <div class="cancel-button" @click="handleCancel">{{ cancelText }}</div>
      <div class="liner-button confirm-button" @click="handleConfirm">{{ confirmText }}</div>
    </div>
  </div>
</template>

<script>
export default {
  name: 'Index',
  props: {
    title: {
      type: String,
      default: ''
    },
    cancelText: {
      type: String,
      default: '取消'
    },
    confirmText: {
      type: String,
      default: '确定'
    }
  },
  data() {
    return {

    }
  },
  methods: {
    handleCancel() {
      this.$emit('onCancel')
    },
    handleConfirm() {
      this.$emit('onConfirm')
    }
  }
}
</script>

<style scoped lang="scss">
.confirm-popover {
  //padding: 10px;
  //border-radius: 8px;
  .bottom-button {
    align-items: center;
    justify-content: flex-end;
    margin-top: 12px;
    >div {
      width: 60px;
      height: 24px;
      line-height: 24px;
      margin-left: 10px;
      text-align: center;
      padding: 0;
      cursor: pointer;
    }
    .cancel-button {
      border: 1px solid $base-color-default;
      color: $base-color-default;
      border-radius: 4px;
    }
    .confirm-button {
      min-width: 0;
    }
  }
}

</style>
